<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class LoginHistoryAddMode extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::table('login_histories', function (Blueprint $table) {
            $table->string('login_mode', 16)->default(\App\Enums\LoginMode::PASSWORD)->comment('登录方式');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::table('login_histories', function (Blueprint $table) {
            $table->dropColumn(['login_mode']);
        });
    }
}
